Optimal. Leaf size=169 \[ -\frac{i d (c+d x) \text{PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}+\frac{d^2 \text{PolyLog}\left (3,-e^{2 i (a+b x)}\right )}{2 b^3}-\frac{d (c+d x) \tan (a+b x)}{b^2}-\frac{d^2 \log (\cos (a+b x))}{b^3}+\frac{(c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac{(c+d x)^2 \tan ^2(a+b x)}{2 b}+\frac{c d x}{b}+\frac{d^2 x^2}{2 b}-\frac{i (c+d x)^3}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.221749, antiderivative size = 169, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 7, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.438, Rules used = {3720, 3475, 3719, 2190, 2531, 2282, 6589} \[ -\frac{i d (c+d x) \text{PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}+\frac{d^2 \text{PolyLog}\left (3,-e^{2 i (a+b x)}\right )}{2 b^3}-\frac{d (c+d x) \tan (a+b x)}{b^2}-\frac{d^2 \log (\cos (a+b x))}{b^3}+\frac{(c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{b}+\frac{(c+d x)^2 \tan ^2(a+b x)}{2 b}+\frac{c d x}{b}+\frac{d^2 x^2}{2 b}-\frac{i (c+d x)^3}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3720
Rule 3475
Rule 3719
Rule 2190
Rule 2531
Rule 2282
Rule 6589
Rubi steps
\begin{align*} \int (c+d x)^2 \tan ^3(a+b x) \, dx &=\frac{(c+d x)^2 \tan ^2(a+b x)}{2 b}-\frac{d \int (c+d x) \tan ^2(a+b x) \, dx}{b}-\int (c+d x)^2 \tan (a+b x) \, dx\\ &=-\frac{i (c+d x)^3}{3 d}-\frac{d (c+d x) \tan (a+b x)}{b^2}+\frac{(c+d x)^2 \tan ^2(a+b x)}{2 b}+2 i \int \frac{e^{2 i (a+b x)} (c+d x)^2}{1+e^{2 i (a+b x)}} \, dx+\frac{d \int (c+d x) \, dx}{b}+\frac{d^2 \int \tan (a+b x) \, dx}{b^2}\\ &=\frac{c d x}{b}+\frac{d^2 x^2}{2 b}-\frac{i (c+d x)^3}{3 d}+\frac{(c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{b}-\frac{d^2 \log (\cos (a+b x))}{b^3}-\frac{d (c+d x) \tan (a+b x)}{b^2}+\frac{(c+d x)^2 \tan ^2(a+b x)}{2 b}-\frac{(2 d) \int (c+d x) \log \left (1+e^{2 i (a+b x)}\right ) \, dx}{b}\\ &=\frac{c d x}{b}+\frac{d^2 x^2}{2 b}-\frac{i (c+d x)^3}{3 d}+\frac{(c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{b}-\frac{d^2 \log (\cos (a+b x))}{b^3}-\frac{i d (c+d x) \text{Li}_2\left (-e^{2 i (a+b x)}\right )}{b^2}-\frac{d (c+d x) \tan (a+b x)}{b^2}+\frac{(c+d x)^2 \tan ^2(a+b x)}{2 b}+\frac{\left (i d^2\right ) \int \text{Li}_2\left (-e^{2 i (a+b x)}\right ) \, dx}{b^2}\\ &=\frac{c d x}{b}+\frac{d^2 x^2}{2 b}-\frac{i (c+d x)^3}{3 d}+\frac{(c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{b}-\frac{d^2 \log (\cos (a+b x))}{b^3}-\frac{i d (c+d x) \text{Li}_2\left (-e^{2 i (a+b x)}\right )}{b^2}-\frac{d (c+d x) \tan (a+b x)}{b^2}+\frac{(c+d x)^2 \tan ^2(a+b x)}{2 b}+\frac{d^2 \operatorname{Subst}\left (\int \frac{\text{Li}_2(-x)}{x} \, dx,x,e^{2 i (a+b x)}\right )}{2 b^3}\\ &=\frac{c d x}{b}+\frac{d^2 x^2}{2 b}-\frac{i (c+d x)^3}{3 d}+\frac{(c+d x)^2 \log \left (1+e^{2 i (a+b x)}\right )}{b}-\frac{d^2 \log (\cos (a+b x))}{b^3}-\frac{i d (c+d x) \text{Li}_2\left (-e^{2 i (a+b x)}\right )}{b^2}+\frac{d^2 \text{Li}_3\left (-e^{2 i (a+b x)}\right )}{2 b^3}-\frac{d (c+d x) \tan (a+b x)}{b^2}+\frac{(c+d x)^2 \tan ^2(a+b x)}{2 b}\\ \end{align*}
Mathematica [B] time = 6.64045, size = 454, normalized size = 2.69 \[ \frac{c d \csc (a) \sec (a) \left (b^2 x^2 e^{-i \tan ^{-1}(\cot (a))}-\frac{\cot (a) \left (i \text{PolyLog}\left (2,e^{2 i \left (b x-\tan ^{-1}(\cot (a))\right )}\right )+i b x \left (-2 \tan ^{-1}(\cot (a))-\pi \right )-2 \left (b x-\tan ^{-1}(\cot (a))\right ) \log \left (1-e^{2 i \left (b x-\tan ^{-1}(\cot (a))\right )}\right )-2 \tan ^{-1}(\cot (a)) \log \left (\sin \left (b x-\tan ^{-1}(\cot (a))\right )\right )-\pi \log \left (1+e^{-2 i b x}\right )+\pi \log (\cos (b x))\right )}{\sqrt{\cot ^2(a)+1}}\right )}{b^2 \sqrt{\csc ^2(a) \left (\sin ^2(a)+\cos ^2(a)\right )}}+\frac{i e^{-i a} d^2 \sec (a) \left (6 \left (1+e^{2 i a}\right ) b x \text{PolyLog}\left (2,-e^{-2 i (a+b x)}\right )-3 i \left (1+e^{2 i a}\right ) \text{PolyLog}\left (3,-e^{-2 i (a+b x)}\right )+2 b^2 x^2 \left (2 b x-3 i \left (1+e^{2 i a}\right ) \log \left (1+e^{-2 i (a+b x)}\right )\right )\right )}{12 b^3}+\frac{\sec (a) \sec (a+b x) \left (d^2 (-x) \sin (b x)-c d \sin (b x)\right )}{b^2}-\frac{d^2 \sec (a) (b x \sin (a)+\cos (a) \log (\cos (a) \cos (b x)-\sin (a) \sin (b x)))}{b^3 \left (\sin ^2(a)+\cos ^2(a)\right )}+\frac{c^2 \sec (a) (b x \sin (a)+\cos (a) \log (\cos (a) \cos (b x)-\sin (a) \sin (b x)))}{b \left (\sin ^2(a)+\cos ^2(a)\right )}+\frac{(c+d x)^2 \sec ^2(a+b x)}{2 b}-\frac{1}{3} x \tan (a) \left (3 c^2+3 c d x+d^2 x^2\right ) \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.321, size = 400, normalized size = 2.4 \begin{align*}{\frac{-i{d}^{2}{\it polylog} \left ( 2,-{{\rm e}^{2\,i \left ( bx+a \right ) }} \right ) x}{{b}^{2}}}-icd{x}^{2}+i{c}^{2}x+2\,{\frac{b{d}^{2}{x}^{2}{{\rm e}^{2\,i \left ( bx+a \right ) }}-i{d}^{2}x{{\rm e}^{2\,i \left ( bx+a \right ) }}+2\,bcdx{{\rm e}^{2\,i \left ( bx+a \right ) }}-icd{{\rm e}^{2\,i \left ( bx+a \right ) }}+b{c}^{2}{{\rm e}^{2\,i \left ( bx+a \right ) }}-i{d}^{2}x-idc}{{b}^{2} \left ({{\rm e}^{2\,i \left ( bx+a \right ) }}+1 \right ) ^{2}}}-{\frac{4\,iacdx}{b}}-{\frac{idc{\it polylog} \left ( 2,-{{\rm e}^{2\,i \left ( bx+a \right ) }} \right ) }{{b}^{2}}}-{\frac{i}{3}}{d}^{2}{x}^{3}+{\frac{2\,i{a}^{2}{d}^{2}x}{{b}^{2}}}+{\frac{{d}^{2}\ln \left ({{\rm e}^{2\,i \left ( bx+a \right ) }}+1 \right ){x}^{2}}{b}}-{\frac{2\,i{a}^{2}cd}{{b}^{2}}}-2\,{\frac{{c}^{2}\ln \left ({{\rm e}^{i \left ( bx+a \right ) }} \right ) }{b}}+{\frac{{c}^{2}\ln \left ({{\rm e}^{2\,i \left ( bx+a \right ) }}+1 \right ) }{b}}-2\,{\frac{{d}^{2}{a}^{2}\ln \left ({{\rm e}^{i \left ( bx+a \right ) }} \right ) }{{b}^{3}}}+{\frac{{\frac{4\,i}{3}}{a}^{3}{d}^{2}}{{b}^{3}}}+2\,{\frac{cd\ln \left ({{\rm e}^{2\,i \left ( bx+a \right ) }}+1 \right ) x}{b}}+{\frac{{d}^{2}{\it polylog} \left ( 3,-{{\rm e}^{2\,i \left ( bx+a \right ) }} \right ) }{2\,{b}^{3}}}+2\,{\frac{{d}^{2}\ln \left ({{\rm e}^{i \left ( bx+a \right ) }} \right ) }{{b}^{3}}}-{\frac{{d}^{2}\ln \left ({{\rm e}^{2\,i \left ( bx+a \right ) }}+1 \right ) }{{b}^{3}}}+4\,{\frac{cda\ln \left ({{\rm e}^{i \left ( bx+a \right ) }} \right ) }{{b}^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 2.44249, size = 1655, normalized size = 9.79 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] time = 0.518016, size = 883, normalized size = 5.22 \begin{align*} \frac{2 \, b^{2} d^{2} x^{2} + 4 \, b^{2} c d x + d^{2}{\rm polylog}\left (3, \frac{\tan \left (b x + a\right )^{2} + 2 i \, \tan \left (b x + a\right ) - 1}{\tan \left (b x + a\right )^{2} + 1}\right ) + d^{2}{\rm polylog}\left (3, \frac{\tan \left (b x + a\right )^{2} - 2 i \, \tan \left (b x + a\right ) - 1}{\tan \left (b x + a\right )^{2} + 1}\right ) + 2 \,{\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2}\right )} \tan \left (b x + a\right )^{2} +{\left (2 i \, b d^{2} x + 2 i \, b c d\right )}{\rm Li}_2\left (\frac{2 \,{\left (i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1} + 1\right ) +{\left (-2 i \, b d^{2} x - 2 i \, b c d\right )}{\rm Li}_2\left (\frac{2 \,{\left (-i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1} + 1\right ) + 2 \,{\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2} - d^{2}\right )} \log \left (-\frac{2 \,{\left (i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1}\right ) + 2 \,{\left (b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2} - d^{2}\right )} \log \left (-\frac{2 \,{\left (-i \, \tan \left (b x + a\right ) - 1\right )}}{\tan \left (b x + a\right )^{2} + 1}\right ) - 4 \,{\left (b d^{2} x + b c d\right )} \tan \left (b x + a\right )}{4 \, b^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (c + d x\right )^{2} \tan ^{3}{\left (a + b x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (d x + c\right )}^{2} \tan \left (b x + a\right )^{3}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]